<?php
class {$controller->controller_name}Controller extends {$controller->controller_extends}{
    
    /**
    /* @var Application_Model_{$controller->controller_name} $_model{$controller->controller_name};
    */
    private $_model{$controller->controller_name};
    
    /**
    * Function init
    * @author tien.nguyen
    */
    public function init(){
        parent::init();
        
        $this->_model{$controller->controller_name} = new Application_Model_{$controller->controller_name}(); 
    }
    
    /**
    /* action default for controller
    /* @author tien.nguyen
    */
    public function indexAction(){
        $this->_redirect('/{$controller->controller_uri}/{$controller->action_default.action_type_name}');
    }
    
    {foreach $actions as $action}
    /**
    * Function {$action->action_description}
    * @author auto
    */
    public function {$action->action_type_name}Action(){
        $params = $this->_getAllParams();
        
        //instance some params of action
        
        //get result from model
        $result = $this->_model{$controller->controller_name}->{$action->action_type_name}($params);
        
        //create form and set value for forms
        {foreach $action->forms as $form}
        //set form and content of form {$form->form_name}        
        {$form_template = $form->form_type_class}
        {include file="$template_path/controllers/actions/forms/$form_template.tpl"}
        
        {/foreach}
        
        //set view value
        {foreach $action->forms as $form}
        $this->view->frm{$form->form_name} = $frm{$form->form_name};
        {/foreach}
    }
    {/foreach}
}